package com.ubing.boot.notesforjava.domel.entity;

import cn.hutool.core.util.DesensitizedUtil;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ubing.boot.notesforjava.annotation.Convert;
import com.ubing.boot.notesforjava.annotation.JsonConvert;
import com.ubing.boot.notesforjava.annotation.Sensitive;
import com.ubing.boot.notesforjava.utils.SensitiveImpl;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserSensitive implements Serializable {
    @JsonConvert(detail = "用户名称",jsonType = Integer.class)
    private String userName;
    @Sensitive(value = DesensitizedUtil.DesensitizedType.ID_CARD)
    @JsonConvert(value = "userId",detail = "身份证号")
    private String idCard;
    @JsonConvert(value = "phoneNumber",detail = "手机号")
    @Sensitive(DesensitizedUtil.DesensitizedType.MOBILE_PHONE)
    private String phone;

}
